// ml:run = $bin < input
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    int t;
    int n, a, b;
    scanf("%d", &t);
    while(t--){
        scanf("%d%d%d", &n, &a, &b);
        if (a==b){
            printf("Alice %d Bob %d\n", n/2+n%2, n/2);
            continue;
        }
        int f;
        int ta=n/2+n%2, tb=n/2;
        int ans[2];
        if (a>b) f=0;
        else {
            swap(a, b);
            swap(ta, tb);
            f=1;
        }
        printf("%d %d %d %d\n", a, b, ta, tb);
        if (a<=tb){
            ans[0]=ta+a-b;
            ans[1]=n-ans[0];
        }
        else{
            a=a-tb;
            int cost=1+a/n;
            ta=a%n;
            tb=n-ta;
            if (cost * tb >=b){
                ans[1]=b/cost;
                ans[0]=n-ans[1];
            }
            else{
                ans[1]=(b-cost*tb)/(cost+1)+tb;
                ans[0]=n-ans[1];
            }
        }
        printf("Alice %d Bob %d\n", f==0?ans[0]:ans[1], f==0?ans[1]:ans[0]);
    }
}

